Selection Sort Visualization

A[0] A[1] A[2] A[3] A[4] A[5] A[6] A[7] A[8] A[9] A[10]
10 21 12 37 14 59 56 74 80 39 20




      






Pseudo Code

  • current=0
  • procedure selection_sort (list)
  •   while(current!=n)
  •      min_index = find_min_index(list,current,n)
  •      if(current!=min_index)
  •        swap(list[current], list[min_index])
  •      end if
  •      current++
  •   end while
  •   return list
  •  end selection_sort procedure